const {exec} = require('../db/mysql')

function getList(num,page=1){
    let sql = `select * from poor where num=${num} limit ${(page-1)*15},15`
    
    return exec(sql)
}

function getCount(num){
    let sql = `select count(*) as count from poor where num=${num}`
    return exec(sql)
}

module.exports = {getList,getCount}
